<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('消费')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-member-edit" th:object="${bizMember}">
            <input th:name="memberId" th:value="*{id}" type="hidden">

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">消费金额：</label>
                <div class="col-sm-8">
                    <input name="money" class="form-control" type="number" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">享受折扣比例(1到100)：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="number" th:field="*{discountRatio}" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">消费项目：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>


        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/member";
        $("#form-member-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/consume", $('#form-member-edit').serialize());
            }
        }

    </script>
</body>
</html>